package com.fc.mall.portal.controller;

import com.fc.mall.base.object.Result;
import com.fc.mall.portal.service.UmsMemberStatisticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Sunny
 * Created by Sunny on 2019/7/2.
 */
@RestController
@RequestMapping("/member/statistics")
public class UmsMemberStatisticsController {

    @Autowired
    private UmsMemberStatisticeService statisticeService;


    @GetMapping("agent/data")
    public Result handleGetMemberAgentData()
    {
        return Result.success(statisticeService.getMemberAgentData());
    }


    @GetMapping("income/data")
    public Result handleIncomeStatistice(@RequestParam Integer filterType)
    {
        return Result.success(statisticeService.getMemberIncomeData(filterType));
    }
}
